package com.mornd.gulimall.apis.ware.to;

import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;

/**
 * @author: mornd
 * @dateTime: 2023/8/27 - 7:18
 * 库存锁定to
 */

@Data
public class WareSkuLockTo implements Serializable {
    @NotBlank
    private String orderSn;
    @NotNull
    @NotEmpty
    private List<@Valid SkuInfo> skuInfo;

    @Data
    public static class SkuInfo implements Serializable {
        @NotNull
        private Long skuId;
        @NotNull @Min(1)
        private Integer count;
    }
}
